www.gusucode.com > Webmeng PHP版Web公司企业网站管理系统 v3.1.0PHP源码程序 > Webmeng PHP版Web公司企业网站管理系统 v3.1.0/WebmengWeb v3.1.0_CN/WebmengWeb v3.1.0_CN/upload/conmeng/core/editor/kedit/plugins/autoheight/autoheight.js
/******************************************************************************* * KindEditor - WYSIWYG HTML Editor for Internet * Copyright (C) 2006-2011 kindsoft.net * * @author Roddy <luolonghao@gmail.com> * @site http://www.kindsoft.net/ * @licence http://www.kindsoft.net/license.php *******************************************************************************/ KindEditor.plugin('autoheight', function(K) { var self = this; if (!self.autoHeightMode) { return; } var edit = self.edit; var body = edit.doc.body; var minHeight = K.removeUnit(self.height); edit.iframe[0].scroll = 'no'; body.style.overflowY = 'hidden'; edit.afterChange(function() { self.resize(null, Math.max((K.IE ? body.scrollHeight : body.offsetHeight) + 62, minHeight)); }); });